#include <iostream>
#include <vector>
using namespace std;
int n;
// //暴力
int dfs_1(int n)
{
    if (n == 1)
        return 1;
    if (n == 2)
        return 2;
    else 
        return dfs_1(n - 1) + dfs_1(n - 2);
}


//记忆化搜索
const  int N = 30;
int memo[N];

int dfs_2(int n)
{
    if (memo[n])
        return memo[n];
    int sum = 0;
    if (n == 1)
        sum = 1;
    else if (n == 2)
        sum = 2;
    else
        sum  = dfs_2(n - 1) + dfs_2(n - 2);
    memo[n] = sum;
    return sum;
}

//dp
int f[N];
int dfs_3(int n)
{
    f[1] = 1;
    f[2] = 2;
    for (int i = 3; i <= n; i++)
    {
        f[i] = f[i - 1] + f[i - 2];//dfs的状态转移公式
    }
    return f[n];
}

int dfs_4(int n)
{
    int tmp1 = 1;
    int tmp2 = 2;
    int tmp3 = 3;
    for (int i = 3; i <= n; i++)
    {
        tmp3 = tmp1 + tmp2;
        tmp1 = tmp2;
        tmp2 = tmp3;
    }
    return tmp3;
}

int main()
{
    cin >> n;
    int ret = dfs_3(n);
    cout << ret << endl;
    return 0;
}